<?php 
echo $this->headLink();
echo $this->headScript();
?>
<style>
body {
	margin:0px !important;
}
</style>
<div class="dialog">
	<div class="top">
		<div class="headline createdir">
			<h2><?php echo $this->translate('admin_album_title')?></h2>
			<p class="description"><?php echo $this->translate('admin_album_description')?></p>
		</div>
	</div>

	<div class="body adminform" id="content" style="display: block; overflow: auto; padding:10px" >
		<form id="adminForm" name="adminForm" action="" method="post">
			<div>
				<table>
					<tbody>	
						<tr>
							<td><label for="dirname"><?php echo $this->translate('admin_album_name')?>:</label></td>
							<td><input type="text" style="width:200px" class="required" name="name" id="name"></td>
						</tr>
						<tr>
							<td valign="top"><label for="dirname"><?php echo $this->translate('admin_album_permission')?>:</label></td>
							<td>
								<?php if (sizeof($this->arrRole)) {
									foreach ($this->arrRole as $item) {									
										echo '<input type="checkbox" id="r'.$item['role_id'].'" name="cid[]" value="'.$item['role_id'].'" />';
										echo '<label for="r'.$item['role_id'].'">'.$item['role_name'].'</label><br />';
									}								
								}?>
								<input type="checkbox" id="rall" name="rall" value="" onclick="jForm.checkAll(this);" />
								<label for="rall">All</label>
							</td>
						</tr>
						<tr>
							<td>&nbsp;</td>
							<td>
								<div class="buttonList">
									<button value="save" type="button" title="<?php echo $this->translate('admin_form_save')?>" onclick="jForm.submitForm();" name="save">
										<?php echo $this->translate('admin_form_save')?></button>
									<button value="cancel" title="<?php echo $this->translate('admin_form_cancel')?>" type="submit" name="btnCancel">
										<?php echo $this->translate('admin_form_cancel')?></button>
								</div>
							</td>
						</tr>						
					</tbody>
				</table>
			</div>
			
		</form>
	</div>
</div>
<script>
var status = <?php echo (isset($this->status) && $this->status=='finish') ? '1' : '0';?>;
if (status == 1) {
	parent.reloadAlbum();
}
	
</script>